package com.families.util;

public class CheckUtil {
	/**
     * 判断请求来自手机端还是电脑端
     */
    public static boolean isMobileDevice(String requestHeader) {
        /*
         * android            :所有安卓设备
         * mas  os            :iphone
         * windows phone    :windows系统手机
         */
        String[] deviceArray = new String[] {"android","mas os","windows phone"};
        if( null == requestHeader) {
            return false;
        }
        requestHeader = requestHeader.toLowerCase();
        for(int i = 0;i<deviceArray.length;i++) {
            if(requestHeader.indexOf(deviceArray[i]) > 0) {
                return true;
            }
        }
        return false;    
    }
}
